package com.community.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * (Complain)表实体类
 *
 * @author makejava
 * @since 2021-10-17 16:37:37
 */
@SuppressWarnings("serial")
public class Complain extends Model<Complain> {
    //id
    @TableId(value = "id", type = IdType.INPUT) //这种方式是主键手动输入
    private Integer id;
    //内容
    private String myContent;
    //区域
    private String myArea;
    //图片地址
    private String imageUrl;
    //所在栋数
    private String buildingNumber;
    //所在房号
    private String roomNumber;
    //备注
    private String remark;

    //创建时间
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private Date createDate;
    //1:未处理 2:已处理 3:未通过
    private Integer status;

    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date beginDate;
    @TableField(exist = false)
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date overDate;

    public Date getBeginDate() {
        return beginDate;
    }

    public void setBeginDate(Date beginDate) {
        this.beginDate = beginDate;
    }

    public Date getOverDate() {
        return overDate;
    }

    public void setOverDate(Date overDate) {
        this.overDate = overDate;
    }


    public String getBuildingNumber() {
        return buildingNumber;
    }

    public void setBuildingNumber(String buildingNumber) {
        this.buildingNumber = buildingNumber;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getRoomNumber() {
        return roomNumber;
    }

    public void setRoomNumber(String roomNumber) {
        this.roomNumber = roomNumber;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMyContent() {
        return myContent;
    }

    public void setMyContent(String myContent) {
        this.myContent = myContent;
    }

    public String getMyArea() {
        return myArea;
    }

    public void setMyArea(String myArea) {
        this.myArea = myArea;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public Date getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Date createDate) {
        this.createDate = createDate;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Complain{" +
                "id=" + id +
                ", myContent='" + myContent + '\'' +
                ", myArea='" + myArea + '\'' +
                ", imageUrl='" + imageUrl + '\'' +
                ", buildingNumber='" + buildingNumber + '\'' +
                ", roomNumber='" + roomNumber + '\'' +
                ", createDate=" + createDate +
                ", status=" + status +
                ", beginDate=" + beginDate +
                ", overDate=" + overDate +
                '}';
    }
}

